package com.auto.autoapp.model

import com.auto.autoapp.task.ChangeIndexTab
import com.auto.autoapp.task.GetDyCodeTask
import com.auto.autoapp.task.GetUserInfoTask
import com.auto.autoapp.task.HandleCommentTask
import com.auto.autoapp.task.SearchTask
import com.auto.autoapp.task.SmoothTask
import com.auto.autoapp.task.ToDyIndex
import com.auto.autoapp.task.VideoCommentTask
import com.ven.assists.stepper.StepImpl

data class CmdInfo(
    val name: String,
    val code: Int? = null,
    val clazz: Class<out StepImpl>,
    val data: Any? = null,
    val title: String? = null,
    val hint: String? = null,
    val needInput: Boolean = false
)

data class VideoInfo(
    var likeCount: Int? = null,
    var liked: Boolean? = null,
    var commentCount: Int? = null,
    var collectCount: Int? = null,
    var collected: Boolean? = null,
    var shareCount: Int? = null,
    var userName: String? = null,
    var videoDes: String? = null
)

data class CommentInfo(
    var nickName: String? = null,
    var content: String? = null,
    var time: String? = null,
    var ip: String? = null
) {
    override fun hashCode(): Int {
        return super.hashCode()
    }

    override fun equals(other: Any?): Boolean {
        if (other is CommentInfo) {
            return other.nickName == nickName && other.content == content && other.time == time && other.ip == ip
        }
        return false
    }
}

data class USerInfo(
    var nickName: String? = null,
    var dyCode: String? = null,
    var ip: String? = null,
    var area: String? = null,
    var likeCount: String? = null,
    var fansCount: String? = null,
    var sex: String? = null,
    var age: String? = null,
    var videoCount: String? = null,
    var accountType: String? = null

)


val cmdList = mutableListOf(
    CmdInfo(
        name = "跳转抖音首页",
        clazz = ToDyIndex::class.java
    ),
    CmdInfo(
        name = "获取抖音号",
        clazz = GetDyCodeTask::class.java
    ),
    CmdInfo(
        name = "切换首页导航栏",
        title = "跳转卡片",
        hint = "输入卡片栏目名称",
        needInput = true,
        clazz = ChangeIndexTab::class.java
    ),
    CmdInfo(
        name = "搜索",
        needInput = true,
        title = "搜索",
        hint = "输入搜索内容",
        clazz = SearchTask::class.java
    ),
    CmdInfo(
        name = "滑动",
        clazz = SmoothTask::class.java
    ),
    CmdInfo(
        name = "视频评论",
        clazz = VideoCommentTask::class.java
    ),
    CmdInfo(
        name = "评论操作",
        clazz = HandleCommentTask::class.java
    ),
    CmdInfo(
        name = "用户主页",
        clazz = GetUserInfoTask::class.java
    )

)